package com.example.settlement.mapper;

import com.example.settlement.entity.JoinInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface JoinInfoMapper {
    @Select("SELECT a.user_id, b.username FROM settlement a LEFT JOIN user_info b ON a.user_id = b.user_id WHERE a.user_id = #{userId}")
    List<JoinInfo> findByUserId(Long userId);
}
